<% uploadDir = "\\192.168.1.4\tesisgalicia.es\www\imagenes\productos\" 'uploadDir = "d:\xvrt\asired.es\html\desarrollo\Tesis001\imagenes\productos\" 'uploadDir = "e:\InetPub\wwwroot\desarrollo\tesisGalicia\imagenes\productos\" ipp=6 pag = int("0" & Request.QueryString("pag")) cat = int("0" & Request.QueryString("cat")) subca = int("0" & Request.QueryString("sub")) Dim fs Set fs = CreateObject("Scripting.FileSystemObject") SqlQuery="Select Count(*) as cuenta from productos where categoria="&cat&" and subcategoria="&subca&"" SET RsTotal = OBJdbConnection.Execute(SQLQuery) total = RsTotal("Cuenta") SET RsTotal = Nothing numpag = int((total-1)/ipp) if pag > numpag then pag=pag-1 END IF if pag < 0 then pag=0 END IF SQlQuery="Select * from productos where categoria="&cat&" and subcategoria="&subca&"" Set RsProd = ObjDbConnection.execute(SqlQuery) If pag <> 0 Then RsProd.Move (pag*ipp) End If %>
           
Página  de <%=numpag+1%> << volver
 
<% SQLQuery = "select * from categorias where idcategoria="&cat Set catnom = OBJdbConnection.Execute(SQLQuery) cat1 = catnom("nombre") if subca<>0 then SQLQuery = "select * from subcategorias where idsubcategoria="&subca Set subcanom = OBJdbConnection.Execute(SQLQuery) sub1 = subcanom("nombre") else sub1 = "Otras subcategorías" end if %> <% if not RsProd.Eof then cuenta=1 do while not RsProd.Eof if Cuenta > ipp Then Exit Do end if %> <% if not RsProd.eof then cuenta=cuenta+1 RsProd.movenext End If loop %> <%end if%>
<%=cat1%> - <%=sub1%>
<%if not RsProd.eof then%><%=fichas_Productos%><%cuenta=cuenta+1%><%RsProd.movenext%><%else%><%end if%> <%if not RsProd.eof then%><%=fichas_Productos%><%else%><%end if%>
<%PieOfertas%>
ESPAÑA: Alemparte Nº 29 A. Areas. 36860 Ponteareas. Pontevedra. Telf: 986 642299 / 986 660243 Fax: 986 661995 - E-mail: comercial@tesisgalicia.es
PORTUGAL: R. Sarmento Beires, 102 - 4450 - 723 Leça da Palmeira Telf: +351 22 999 60 70 Fax: +351 22 999 60 71 Movel: +351 91 929 25 49
Aviso Legal
<% Set RsProd=nothing Set catnom=nothing Set subcanom=nothing %>